home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 127 / PC Guia 127.iso / Software / Utils / GParted Live CD / Bin / gparted-livecd-0.2.2.iso / fake / needwrite / etc / rc.d / init.d / mountfs < prev    next >
Encoding:
Text File  |  2006-01-27  |  1.2 KB  |  52 lines

  1. #!/bin/sh
  2. # Begin $rc_base/init.d/mountfs - File System Mount Script
  3.  
  4. # Based on mountfs script from LFS-3.1 and earlier.
  5. # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
  6.  
  7. . /etc/sysconfig/rc
  8. . $rc_functions
  9.  
  10. case "$1" in
  11.     start)
  12.         echo -e -n '\E[32mRemounting root file system in read-write mode'
  13.                 echo ""
  14.         mount -n -o remount,rw /
  15.         #evaluate_retval
  16.  
  17.         # Remove fsck-related file system watermarks.
  18.         rm -f /fastboot /forcefsck
  19.  
  20.         echo -e -n '\E[32mRecording existing mounts in /etc/mtab'
  21.         > /etc/mtab
  22.         mount -f / || failed=1
  23.         mount -f /proc || failed=1
  24.         if grep -q '[[:space:]]sysfs' /proc/mounts ; then
  25.             mount -f /sys || failed=1
  26.         fi
  27.         (exit $failed)
  28.         #evaluate_retval
  29.  
  30.         # This will mount all filesystems that do not have _netdev in
  31.         # their option list.  _netdev denotes a network filesystem.
  32.         echo -e -n '\E[32mMounting remaining file systems'
  33.                 echo ""
  34.         mount -a -O no_netdev
  35.         #evaluate_retval
  36.         ;;
  37.  
  38.     stop)
  39.         echo -e -n '\E[32mUnmounting all other currently mounted file systems'
  40.         umount -d -r -t noramfs
  41.         #evaluate_retval
  42.         ;;
  43.  
  44.     *)
  45.         echo -e -n '\E[32mUsage: $0 {start|stop}'
  46.                 echo ""
  47.         exit 1
  48.         ;;
  49. esac
  50.  
  51. # End $rc_base/init.d/mountfs
  52.